<?php

#<editor-fold defaultstate="collapsed" desc="CCore::Using">
CCore::Using('base.developments.inc.interface');
#</editor-fold>

class CCoreBaseDevelopmentsLogger implements ICoreBaseDevelopmentsIncInterface
{
	#<editor-fold defaultstate="collapsed" desc="private">
	/**
	 * @var	$oLogger
	 */
	private $_oLogger;
	#</editor-fold>
	
	/**
	 * @param	ACoreLogger		$oLogger
	 * @return	CCoreBaseDevelopmentsLog
	 */
	public function __construct(ACoreLogger $oLogger)
	{
		CCore::CheckTypes(array('$oLogger'));

		$this->_oLogger = $oLogger;
	}

	/**
	 * @param	string	$sDesc
	 * @param	int		$iDescType
	 * @param	string	$nsPrefix = null
	 * @return	bool
	 */
	public function Write($sDesc, $iDescType, $nsPrefix = null)
	{
		CCore::CheckTypes(array('$sDesc', '$iDescType', '$nsPrefix'));

		$nsPrefix = (null === $nsPrefix) ? '' : $nsPrefix.': ';
		$this->_oLogger->Write($nsPrefix.$sDesc);
	}

	/**
	 * @return	bool
	 */
	public function Clear()
	{
		return $this->_oLogger->Clear();
	}
}